package com.anysoft.utils;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.anysoft.R;
import com.anysoft.bean.BannersBean;
import com.youth.banner.loader.ImageLoader;


/**
 * Created by lty on 2017/11/28.
 */

public class GlideImageLoader extends ImageLoader {
    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {
        if (path instanceof BannersBean.DataBean) {
            BannersBean.DataBean bannerBean = (BannersBean.DataBean) path;
            Glide.with(context).load(bannerBean.getBannerImg()).placeholder(R.mipmap.banner_default).error(R.mipmap.banner_default).into
                    (imageView);
        }

    }
}